// FiberTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "HttpServer.h"

#include "wxtl/Trace.h"
#include "waloc/new_delete.h"

#include "FibEvent/BaseFiberClientHandler.h"

void Init()
{
	BaseFiberServer::Initialize();
	wxtl::Socket::startUp();
	Fiber::Init();	

	OperatorNewCriticalSectionInit();
	
	InitHttpLog();
	
}

int _tmain(int, _TCHAR**)
{
	Init();
	HttpServer server;
	if(!server.ReadConfig(L"http.xml"))
	{
		abort();
	}
	
	server.Listen(81);
	
	Sleep(10);
	HTTPINFO("Listening at http://localhost:" << server.GetPort());

	Sleep(INFINITE);
	return 0;
}

